package com.example.mybatis2.mapper;

import com.example.mybatis2.model.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2023-03-06
 * Time: 23:17
 */
@Mapper
public interface UserMapper {

    // 注意传递的参数是对象时, 不用加上@Param
    public int addUser( Userinfo userinfo);

    public List<Userinfo> getUserByNameOrAddress(@Param("name") String name,
                                                 @Param("address") String address);

    public int updateUserinfo(Userinfo userinfo);

    public int deleteUserinfoById(List<Integer> ids);
}
